<?php
    //配置
    define('ROOT', 'http://'.$_SERVER['HTTP_HOST']);

    // css目录
    define('CSS_DIR', ROOT.'/static/styles/');

    // js目录
    define('JS_DIR', ROOT.'/static/scripts/');

    // 图片路径
    define('IMG_DIR', ROOT.'/Admin/');

    // views路径
    define('VIEWS_DIR', ROOT.'/views/');

    include 'functions.php';

    // 数据库连接
    $host = 'localhost';
    $user = 'root';
    $passwd = 123456;
    $db_name = 'nndou';

    connect($host, $user, $passwd, $db_name);

